# Directory where the ElasticSearch binary distribution resides
ES_HOME=/usr/share/elasticsearch

# Heap Size (defaults to 256m min, 1g max)
ES_HEAP_SIZE=<%= @es_heap_size %>

# Heap new generation
<% if @es_heap_newsize -%>
ES_HEAP_NEWSIZE=<%= @es_heap_newsize %>
<% else -%>
#ES_HEAP_NEWSIZE=
<% end -%>

# max direct memory
<% if @es_direct_size -%>
ES_DIRECT_SIZE=<%= @es_direct_size %>
<% else -%>
#ES_DIRECT_SIZE=
<% end -%>

# Additional Java OPTS
<% if @es_java_opts -%>
ES_JAVA_OPTS=<%= @es_java_opts %>
<% else -%>
#ES_JAVA_OPTS=
<% end -%>

# Maximum number of open files
MAX_OPEN_FILES=<%= @max_open_files %>

# Maximum amount of locked memory
<% if @max_locked_memory -%>
MAX_LOCKED_MEMORY=<%= @max_locked_memory %>
<% else -%>
#MAX_LOCKED_MEMORY=
<% end -%>

# Maximum number of VMA (Virtual Memory Areas) a process can own
MAX_MAP_COUNT=<%= @max_map_count %>

# ElasticSearch log directory
LOG_DIR=<%= @logdir %>

# ElasticSearch data directory
DATA_DIR=<%= @datadir %>

# ElasticSearch work directory
WORK_DIR=/tmp/elasticsearch

# ElasticSearch conf directory
CONF_DIR=<%= @confdir %>

# ElasticSearch configuration file (elasticsearch.yml)
CONF_FILE=<%= @confdir%>/<%= @file_config %>

# User to run as, change this to a specific elasticsearch user if possible
# Also make sure, this user can write into the log directories in case you change them
# This setting only works for the init script, but has to be configured separately for systemd startup
ES_USER=<%= @elasticsearch_user %>

# Configure restart on package upgrade (true, every other setting will lead to not restarting)
#RESTART_ON_UPGRADE=true
